from selenium import webdriver
from selenium.webdriver.common.by import By
from time import sleep

driver = webdriver.Firefox()
url = 'file:///C:/Users/tedu/Desktop/NSD2406/html/registerA.html'
driver.get(url)
# 通过CSS定位用户名输入框
# username = driver.find_element(By.CSS_SELECTOR, '#userA')
# username = driver.find_element(By.CSS_SELECTOR, '#p1 > input')
username = driver.find_element(By.CSS_SELECTOR, 'input[name="userA"]')
username.send_keys('admin')
# 电话号码
tel = driver.find_element(By.CSS_SELECTOR, '.telA')
tel.send_keys('13899998888')

sleep(3)
driver.quit()